package com.itheima;
import com.itheima.controller.AnimalController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class AnnotationTest {
    public static void main(String[] args){
        ApplicationContext applicationContext=new
                ClassPathXmlApplicationContext("applicationContext.xml");


        AnimalController animal=(AnimalController)
                applicationContext.getBean("animalcontroller");
        System.out.print("今天天空飞来了一群鸟,");
        animal.run("乌鸦",2);
        System.out.print(",");
        animal.run("凤凰",2);
        System.out.print("。");
        animal.begin("乌鸦");
        System.out.print(",");
        animal.begin("凤凰");
        System.out.print("。");
    }
}